##
##	$Header: /pub/cvsroot/mydns/configure.ac,v 1.31 2002/07/13 05:08:32 bboy Exp $
##
##	Copyright (C) 2002  Don Moore <bboy@bboy.net>
##
##	This program is free software; you can redistribute it and/or modify
##	it under the terms of the GNU General Public License as published by
##	the Free Software Foundation; either version 2 of the License, or
##	(at Your option) any later version.
##
##	This program is distributed in the hope that it will be useful,
##	but WITHOUT ANY WARRANTY; without even the implied warranty of
##	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##	GNU General Public License for more details.
##
##	You should have received a copy of the GNU General Public License
##	along with this program; if not, write to the Free Software
##	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
##

AC_INIT(mydns, 0.6, [bboy@bboy.net])	## Package name, version, bugreport address
AC_PREREQ(2.53)
AM_INIT_AUTOMAKE(mydns, 0.6)
AM_CONFIG_HEADER(config.h)

## @WEBROOT@ def for builds on homepage
WEBROOT="/www/htdocs/mydns"
AC_SUBST(WEBROOT)

## Checks for programs
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_CHECK_PROGS(PERL,perl)
AC_CHECK_PROGS(MAKEINFO,makeinfo)
AC_CHECK_PROGS(DVIPS,dvips)

## GNU gettext
AM_GNU_GETTEXT

## Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h getopt.h netdb.h pwd.h signal.h stdarg.h termios.h time.h])
AC_CHECK_HEADERS([sys/fcntl.h sys/file.h sys/resource.h sys/socket.h sys/time.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([arpa/inet.h])

## Typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_CHECK_TYPES([u_int8_t,u_int16_t,u_int32_t,u_int64_t,unsigned long long,unsigned quad])

## Library functions
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_FUNC_ALLOCA
AC_CHECK_FUNCS([memset getpwuid strtoull strtouq inet_ntop inet_pton])

## Declarations
AC_CHECK_DECLS([strcasecmp, strcoll, strerror, strncasecmp])

##
## Some MyDNS-specific checks (see m4/mydns.m4)
##
AC_CHECK_IPV6				#	Check IPv6 support
AC_MYDNS_CFLAGS			#	Possibly set CFLAGS
AC_MYDNS_PKGINFO			#	Set some package-specific variables
AC_ENABLE_DEBUG			#	Enable debugging?
AC_ENABLE_MTRACE			#	Check --enable-mtrace
AC_LIB_Z						#	Find the zlib compression library
AC_LIB_MYSQLCLIENT		#	Find libmysqlclient
AC_HEADER_MYSQL			#	Find location of MySQL header files


AC_OUTPUT(	extras/Makefile \
				intl/Makefile \
				po/Makefile.in \
				m4/Makefile \
				Makefile \
				lib/Makefile \
				src/Makefile \
					src/lib/Makefile \
					src/mydns/Makefile \
					src/test/Makefile \
				pkg/Makefile \
				doc/Makefile \
			)

## vi:set ts=3:
